Testing Completeness of Code Selector Specifications
نویسنده
چکیده
1 I n t r o d u c t i o n The tree pat tern matching approach for code selection has proven very successful. I t allows to specify code selectors using declarative specifications and to derive efficient code selectors automatically. The program which translates the specification into the final code selector program is called code selector generator. Sometimes it is integrated with generators for other par ts of a code generator. However this paper deals only with the aspect of code selection. The specifications are essentially rule based. The user only writes rules specifying how code can can be selected but not the exact way the rules have to be applied in order to get good code. This is determined automatical ly by the code generator generator system. The user annotates the rules with cost values and the system selects good code according to this cost measure. The rule based approach has a lot of advantages which make it much superior to hand programming. However there is a small disadvantage: During hand programming one is usually forced to consider all possible constructs of the intermediate code as inputs for the code selector. When writing rules this is no longer the case. I t is therefore much more likely to forget a rule for a certain construct of the intermediate code. This might show up as an error, only if the corresponding construct is used in a very special context. This paper presents a method to detect statically if there are rules missing and if so to produce an appropriate error message. With such a test a lgori thm at hand * This work was carried out within the Esprit Project #5399 (COMPARE)
منابع مشابه
Code Selection Techniques: Pattern Matching, Tree Parsing, and Inversion of Derivors
Significant progress in the area of formal tools to support the construction of code generators in recent years has come along with a severe terminological confusion. Closely related techniques appear in different styles, further obscured by ad-hoc extensions. We try to alleviate this situation by suggesting that the code selection task should be understood as the problem of inversion of a hier...
متن کاملHEPA Filters specifications in two standards, ASME AG-1 & DOE for using in Tehran Research Reactor (TRR)
HEPA filters serve as important safety device to protect personnel as well as the public and environment from the radiation effects exist in the air, so they are vital devices in the event accidents. DOE provides directions through the use of two technical standards, 3020 and 3025, including QA requirements for the procurement, packaging, shipping and storage of HEPA filters and also provides d...
متن کاملExpressiveness and Complexity of Crosscut Languages
Selector languages, or crosscut languages, play an important role in aspect-oriented programming (AOP). Examples of prominent selector languages include the pointcut language in AspectJ, traversal specifications in Demeter, XPath for databases, and regular expressions. A selector language expression, also referred to as a selector, selects nodes on an instance graph (an execution tree or an obj...
متن کاملPrecise Documentation of Requirements and Executable Specifications
We propose a format for precise documentation of requirements to drive the development of dependable software products and to provide evidence for their certification. Requirements are elicited from customers and expressed informally as atomic English descriptions. To analyze the consistency of the requirements, we translate them into a software specification consisting of model contracts and t...
متن کاملThe JML and JUnit Way of Unit Testing and its Implementation
Writing unit test code is labor-intensive, hence it is often not done as an integral part of programming. However, unit testing is a practical approach to increasing the correctness and quality of software; for example, Extreme Programming relies on frequent unit testing. In this paper we present a new approach that makes writing unit tests easier. It uses a formal specification language’s runt...
متن کامل